<extend  name="public@:user_basics"/>
<block name="body">
    <div class="row-content am-cf">
        <div class="row  am-cf">
            <div class="am-u-sm-12 am-u-md-6 am-u-lg-3">
                <div class="widget am-cf">
                    <div class="widget-head am-cf">
                        <div class="widget-title am-fl">账户余额</div>
                        <div class="widget-function am-fr">
                            <a href="{:cmf_url('user/profile/edit')}" class="am-icon-cog"></a>
                        </div>
                    </div>
                    <div class="widget-body am-fr">
                        <div class="am-fl">
                            <div class="widget-fluctuation-period-text">
                                ￥{$user.balance}
                            </div>
                        </div>
                        <div class="am-fr am-cf">
                            <!--<div class="widget-fluctuation-description-text am-text-right">
                                手动提现：满50.00元

                            </div>
                            <div class="widget-fluctuation-description-text am-text-right">
                                自动结算：满100.00元
                            </div>-->
                        </div>
                    </div>
                </div>

            </div>
            <div class="am-u-sm-12 am-u-md-6 am-u-lg-3">
                <div class="widget widget-primary am-cf">
                    <div class="widget-statistic-header">
                        今日收入（元）
                    </div>
                    <div class="widget-statistic-body">
                        <div class="widget-statistic-value">
                            ￥{$todayCount}
                        </div>
                        <div class="widget-statistic-description">
                            <!--今日成交笔数：{$todayCount}笔-->
                        </div>
                        <span class="widget-statistic-icon am-icon-credit-card-alt"></span>
                    </div>
                </div>
            </div>
            <div class="am-u-sm-12 am-u-md-6 am-u-lg-3">
                <div class="widget widget-purple am-cf">
                    <div class="widget-statistic-header">
                        昨日收入（元）
                    </div>
                    <div class="widget-statistic-body">
                        <div class="widget-statistic-value">
                            ￥{$yesterdayCount}
                        </div>
                        <div class="widget-statistic-description">
                            <!--昨日成交笔数：{$yesterdayCount}笔-->
                        </div>
                        <span class="widget-statistic-icon am-icon-credit-card-alt"></span>
                    </div>
                </div>
            </div>
            <div class="am-u-sm-12 am-u-md-6 am-u-lg-3">
                <div class="widget am-cf">
                    <div class="am-u-sm-12 am-u-md-12 am-u-lg-12">
                    	<p class="kfxx01"><i class="am-icon-qq"></i>客服QQ:<br>{$service.qq}</p>
                        <p class="kfxx01"><i class="am-icon-phone"></i>客服电话:<br>{$service.user_phone}</p>
                       <!-- <img src="assets/img/zskf.png" class="indexkefu widget-statistic-header"/>
                        <p style="margin-top: 4px;font-size: 0.8rem;text-align: center"><b>您的微信专属客服</b><br>扫码添加,<b style="color: #FF0000;">24h</b>服务</p>-->
                    </div>
                    <!--<img src="assets/img/user02.png" class="am-u-sm-5 am-u-md-4 am-u-lg-5 widget-statistic-header"/>-->
                </div>
            </div>
        </div>

        <div class="row am-cf">
            <div class="am-u-sm-12 am-u-md-12">
                <div class="widget am-cf" style="margin-bottom: 0;">
                    <div class="widget-head am-cf">
                        <div class="widget-title am-fl">收益统计（显示最近七天的数据）</div>
                    </div>
                    <div class="widget-body-md widget-body tpl-amendment-echarts am-fr" id="container">

                    </div>
                </div>
            </div>

            <!--<div class="am-u-sm-12 am-u-md-4">
                <div class="widget am-cf" style="margin-bottom: 0;">
                    <div class="widget-head am-cf">
                        <div class="widget-title am-fl">最新公告</div>
                    </div>
                    <div class="widget-body widget-body-md am-fr">
                        <a href="" class="gonggaotz"><i class="am-icon-volume-up"></i>2019元旦放假通知</a>
                        <a href="" class="gonggaotz"><i class="am-icon-volume-up"></i>2019元旦放假通知</a>
                        <a href="" class="gonggaotz"><i class="am-icon-volume-up"></i>2019元旦放假通知</a>
                        <a href="" class="gonggaotz"><i class="am-icon-volume-up"></i>2019元旦放假通知</a>
                        <a href="" class="gonggaotz"><i class="am-icon-volume-up"></i>2019元旦放假通知</a>
                    </div>
                </div>
            </div>-->
        </div>
    </div>

    <script type="text/javascript" src="http://echarts.baidu.com/gallery/vendors/echarts/echarts.min.js"></script>
    <script type="text/javascript" src="http://echarts.baidu.com/gallery/vendors/echarts-gl/echarts-gl.min.js"></script>
    <script type="text/javascript" src="http://echarts.baidu.com/gallery/vendors/echarts-stat/ecStat.min.js"></script>
    <script type="text/javascript" src="http://echarts.baidu.com/gallery/vendors/echarts/extension/dataTool.min.js"></script>
    <script type="text/javascript" src="http://echarts.baidu.com/gallery/vendors/echarts/map/js/china.js"></script>
    <script type="text/javascript" src="http://echarts.baidu.com/gallery/vendors/echarts/map/js/world.js"></script>
    <script type="text/javascript" src="http://echarts.baidu.com/gallery/vendors/echarts/extension/bmap.min.js"></script>
    <script type="text/javascript" src="http://echarts.baidu.com/gallery/vendors/simplex.js"></script>
    <script>
        var dom = document.getElementById("container");
        var myChart = echarts.init(dom);
        var app = {};
        option = null;
        app.title = '坐标轴刻度与标签对齐';

        option = {
            color: ['#3398DB'],
            tooltip : {
                trigger: 'axis',
                axisPointer : {            // 坐标轴指示器，坐标轴触发有效
                    type : 'line'        // 默认为直线，可选为：'line' | 'shadow'
                }
            },
            grid: {
                left: '3%',
                right: '4%',
                bottom: '3%',
                containLabel: true
            },
            xAxis : [
                {
                    type : 'category',
                    // data : ['一', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],/*时间*/
                    data : [],
                    axisTick: {
                        alignWithLabel: true
                    }
                }
            ],
            yAxis : [
                {
                    type : 'value'
                }
            ],
            series : [
                {
                    name:'收入数据',
                    type:'bar',
                    barWidth: '60%',
                    // data:[10, 52, 200, 334, 390, 330, 220]//钱
                    data:[]
                }
            ]
        };
        ;

        $.post("{:cmf_url('money/getSevenSkyData')}",{id:1},function (da) {
            $.each(da.data,function (i,n) {
                option.xAxis[0].data.push(n.name+'（元）');
                option.series[0].data.push(n.money);
            });
            if(option.series[0].data.length == 0){
                $('#container').html('暂无数据可统计');
                return;
            }
            if (option && typeof option === "object" ) {
                myChart.setOption(option, true);
            }
        })

    </script>
</block>